public class Solution2 {
    public static String toLowerCase(String s) {
        char[] result = new char[s.length()];
        for (int i = 0; i < s.length(); i++) {
            char ret = s.charAt(i);
            if (ret >= 'A' && ret <= 'Z') {
                ret = (char) (ret + 'a' - 'A');
            }
            result[i] = ret;
        }
        return new String(result);
    }

    public static void main(String[] args) {
        System.out.println(toLowerCase("HeLLo"));
    }
}
